<?php
namespace Mageplaza\Chankit\Controller\Index;

class Test extends \Magento\Framework\App\Action\Action
{
    protected $_pageFactory;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $pageFactory)
    {
        $this->_pageFactory = $pageFactory;
        return parent::__construct($context);
    }

    public function execute()
    {
        echo $this->getLayout()
            ->createBlock('Mageplaza\Chankit\Block\Index')
            ->setTemplate('Mageplaza_Chankit::index.phtml')
            ->toHtml();
       // $this->_redirect('*/*/index');
        //$this->_forward('index');
        //$this->_redirect('*/*/index');
       /* echo "Hello World";
        exit;*/
    }
}
